//
//  APIBaseService.h
//  BaoZhangWang
//
//  Created by yyy on 2016/12/13.
//  Copyright © 2016年 yyy. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "URLResponse.h"

typedef void (^kServiceCallback)(URLResponse *response);
@class APIBaseManager;
@protocol APIManager;

@interface APIBaseService : NSObject

+ (instancetype)service;

- (NSInteger)callAPIManager:(APIBaseManager *)manager complete:(kServiceCallback)complete;
- (NSMutableURLRequest *)requestWithAPIManager:(APIBaseManager <APIManager> *)manager
                                         error:(NSError **)serializationError;

- (void)cancelRequestWithRequestID:(NSNumber *)requestID;
- (void)cancelRequestWithRequestIDList:(NSArray *)requestIDList;

@end
